def simple(n):
    c = 0
    for i in range(1, n+1):
        if n % i == 0:
            c+=1
        
    if c == 2:
        return True
    return False

digit = ["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"]
s = input().split()
s1 = ''
flag = 0
for d in s:
    if d in digit:
        s1+= str(digit.index(d))
    else:
        flag = 1
        
if len(s) != 3:
    flag = 1
if flag:
    print("Wrong input")
    
else:
    print(simple(int(s1)))
    
    